package com.cndw.kongfu.ui;

import javax.swing.ImageIcon;

public abstract class AbstractNode {
	
	private ImageIcon icon;
	
	public ImageIcon getImageIcon(String imagePath) {
		if (this.icon == null) {
			this.icon = new ImageIcon(imagePath);
		}
		return this.icon;
	}
	
	public String toString() {
		return getText();
	}
	
	public abstract String getText();
}
